<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        /* img {
            display: block;
            height: 5000px;
        } */


        body {
            height: 3000px;
        }

    </style>
</head>
<body>

    <div></div>

    <script>

        const div = document.querySelector('div');

        window.addEventListener('scroll', function () {
            console.dir(window.pageYOffset);
            console.dir(window.scrollY);
        });

        // click mousedown mouseup mousemove keydown keyup scroll wheel
        //

    </script>

</body>
</html>